# Version 1.0

FROM centos:6.6
MAINTAINER      hucw    <hu.cwei@qq.com>

RUN yum -y install openssh openssh-server openssh-clients \
                                                                   
        && rm -rf /var/cache/yum/* \                               
        && yum clean all                                           
                                                            
RUN sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config \
        && rm -rf /var/cache/yum/* \                        
        && yum clean all                                    
                                                            
USER root                                                     
                                                              
RUN echo "root:goodbaby" | chpasswd                           
                                                              
RUN ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key \       
        && ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key \
        && mkdir /var/run/sshd    
                                  
EXPOSE 22                         
                                  
ENTRYPOINT ["/usr/sbin/sshd","-D"]
